home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / New System Software Extensions / OpenDoc A6 / SOM / OpenDoc and SOM / CPlusPlus / LinkSrcB.xh < prev    next >
Encoding:
Text File  |  1994-04-19  |  7.1 KB  |  291 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: Locrian:WWDCSun:CPlusPlus:LinkSrcB.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: somc/smemit.c
  7.  *     SOM Emitter emitxh.dll: somc/smmain.c
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *  Theory of Operation
  13.  * 
  14.  * 
  15.  *  Classes defined in this interface
  16.  * 
  17.  */
  18.  
  19.  
  20. #ifndef SOM_ODBaseLinkSource_xh
  21. #define SOM_ODBaseLinkSource_xh
  22.  
  23. class ODBaseLinkSource;
  24.  
  25. #define ODBaseLinkSource_MajorVersion 1
  26. #define ODBaseLinkSource_MinorVersion 0
  27.  
  28. /* C++ som defs */
  29. #include <somcls.xh>
  30.  
  31. /* Include C++ parent defs */
  32. #ifndef SOM_ODPersistentObject_xh
  33. #include <PstObj.xh>
  34. #endif
  35.  
  36. #ifndef ODBaseLinkSource_API
  37. #define ODBaseLinkSource_API
  38. /*
  39.  * -- The Class API
  40.  */
  41.  
  42. /*
  43.  * Start of user-defined types:
  44.  */
  45. class ODExtension;
  46. class ODStorageUnit;
  47. class ODLink;
  48. class ODPart;
  49. class ODPartList;
  50. class ODDraft;
  51.  
  52. /*
  53.  * End of user-defined types.
  54.  */
  55.  
  56. #if applec ^ PRAGMA_LIB_EXPORT
  57. #pragma lib_export on
  58. #endif
  59.  
  60.  
  61. /* A procedure to create the ODBaseLinkSource Class */
  62. SOMEXTERN SOMClass * SOMLINK ODBaseLinkSourceNewClass(
  63.         integer4 majorVersion,
  64.         integer4 minorVersion);
  65.  
  66. /* The API to the ODBaseLinkSource class object, and the methods it introduces. */
  67. typedef struct ODBaseLinkSourceClassDataStructure {
  68.     SOMClass *classObject;
  69.     somMToken Lock;
  70.     somMToken Unlock;
  71.     somMToken GetContentStorageUnit;
  72.     somMToken ContentChanged;
  73.     somMToken Clear;
  74.     somMToken GetChangeID;
  75.     somMToken SetAutoUpdate;
  76.     somMToken IsAutoUpdate;
  77.     somMToken GetLink;
  78.     somMToken SetSourcePart;
  79.     somMToken ShowSourceContent;
  80.     somMToken GetChangeTime;
  81.     somMToken CloneTo;
  82.     somMToken reserved1;
  83.     somMToken reserved2;
  84. } ODBaseLinkSourceClassDataStructure;
  85. #ifdef SOM_NO_DATA_EXPORTS
  86.    SOMEXTERN ODBaseLinkSourceClassDataStructure * ODBaseLinkSourceGetClassData ( void );
  87. #   undef ODBaseLinkSourceClassData
  88. #   define ODBaseLinkSourceClassData (*ODBaseLinkSourceGetClassData())
  89. #else
  90.    SOMEXTERN ODBaseLinkSourceClassDataStructure ODBaseLinkSourceClassData;
  91. #endif /* SOM_NO_DATA_EXPORTS */
  92.  
  93. #if applec ^ PRAGMA_LIB_EXPORT
  94. #pragma lib_export off
  95. #endif
  96.  
  97. #define _ODBaseLinkSource ODBaseLinkSourceClassData.classObject
  98.  
  99. /* The API to parentMtabs for ODBaseLinkSource, and the instance data it introduces. */
  100. SOMEXTERN struct ODBaseLinkSourceCClassDataStructure {
  101.     somMethodTabs parentMtab;
  102.     somDToken instanceDataToken;
  103. } ODBaseLinkSourceCClassData;
  104.  
  105. /*
  106.  * -- Typedefs for Procedures that support Methods introduced by ODBaseLinkSource
  107.  */
  108. SOMEXTERN {
  109. typedef ODBoolean   (* SOMLINK somTD_ODBaseLinkSource_Lock)(ODBaseLinkSource *somSelf, Environment *ev,
  110.         ODULong wait,
  111.         ODLinkKey key);
  112. typedef void   (* SOMLINK somTD_ODBaseLinkSource_Unlock)(ODBaseLinkSource *somSelf, Environment *ev,
  113.         ODLinkKey key);
  114. typedef ODStorageUnit*   (* SOMLINK somTD_ODBaseLinkSource_GetContentStorageUnit)(ODBaseLinkSource *somSelf, Environment *ev,
  115.         ODLinkKey key);
  116. typedef void   (* SOMLINK somTD_ODBaseLinkSource_ContentChanged)(ODBaseLinkSource *somSelf, Environment *ev,
  117.         ODChangeID id);
  118. typedef void   (* SOMLINK somTD_ODBaseLinkSource_Clear)(ODBaseLinkSource *somSelf, Environment *ev,
  119.         ODChangeID id,
  120.         ODLinkKey key);
  121. typedef ODChangeID   (* SOMLINK somTD_ODBaseLinkSource_GetChangeID)(ODBaseLinkSource *somSelf, Environment *ev);
  122. typedef void   (* SOMLINK somTD_ODBaseLinkSource_SetAutoUpdate)(ODBaseLinkSource *somSelf, Environment *ev,
  123.         ODBoolean automatic);
  124. typedef ODBoolean   (* SOMLINK somTD_ODBaseLinkSource_IsAutoUpdate)(ODBaseLinkSource *somSelf, Environment *ev);
  125. typedef ODLink*   (* SOMLINK somTD_ODBaseLinkSource_GetLink)(ODBaseLinkSource *somSelf, Environment *ev);
  126. typedef void   (* SOMLINK somTD_ODBaseLinkSource_SetSourcePart)(ODBaseLinkSource *somSelf, Environment *ev,
  127.         ODStorageUnit* sourcePartSU);
  128. typedef void   (* SOMLINK somTD_ODBaseLinkSource_ShowSourceContent)(ODBaseLinkSource *somSelf, Environment *ev);
  129. typedef ODTime   (* SOMLINK somTD_ODBaseLinkSource_GetChangeTime)(ODBaseLinkSource *somSelf, Environment *ev);
  130. typedef ODStorageUnit*   (* SOMLINK somTD_ODBaseLinkSource_CloneTo)(ODBaseLinkSource *somSelf, Environment *ev,
  131.         ODDraftKey draftKey,
  132.         ODDraft* destDraft,
  133.         ODStorageUnit* newSourcePartSU);
  134. }
  135.  
  136. #endif /* ODBaseLinkSource_API */
  137.  
  138.  
  139. /*
  140.  * -- Method Tokens are Thunks
  141.  */
  142. #undef somresolve_
  143. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  144.  
  145. /*
  146.  * -- The C++ Wrapper Class for ODBaseLinkSource
  147.  */
  148. class ODBaseLinkSource : public ODPersistentObject
  149. {
  150. public:
  151.  
  152. void *operator new(size_t size)
  153. {
  154.    SOM_IgnoreWarning(size);
  155.    if (!ODBaseLinkSourceClassData.classObject) 
  156.       ODBaseLinkSourceNewClass(ODBaseLinkSource_MajorVersion,ODBaseLinkSource_MinorVersion);
  157.    return (void *)
  158.       ((somTD_SOMClass_somNew)
  159.       somresolve_((SOMObject *)((void*)(ODBaseLinkSourceClassData.classObject)),
  160.                  SOMClassClassData.somNew))
  161.          ((SOMClass *)((void*)(ODBaseLinkSourceClassData.classObject)));
  162. }
  163.  
  164. void operator delete(void * obj)
  165. {
  166.    ((SOMObject *)obj)->somFree();
  167. }
  168.  
  169. /* public method: Lock */
  170. ODBoolean   Lock(Environment *ev,
  171.         ODULong wait,
  172.         ODLinkKey key)
  173. {
  174.    return SOM_Resolve(this,ODBaseLinkSource,Lock)
  175.     (this,ev,wait,key);
  176. }
  177.  
  178.  
  179. /* public method: Unlock */
  180. void   Unlock(Environment *ev,
  181.         ODLinkKey key)
  182. {
  183.    SOM_Resolve(this,ODBaseLinkSource,Unlock)
  184.     (this,ev,key);
  185. }
  186.  
  187.  
  188. /* public method: GetContentStorageUnit */
  189. ODStorageUnit*   GetContentStorageUnit(Environment *ev,
  190.         ODLinkKey key)
  191. {
  192.    return SOM_Resolve(this,ODBaseLinkSource,GetContentStorageUnit)
  193.     (this,ev,key);
  194. }
  195.  
  196.  
  197. /* public method: ContentChanged */
  198. void   ContentChanged(Environment *ev,
  199.         ODChangeID id)
  200. {
  201.    SOM_Resolve(this,ODBaseLinkSource,ContentChanged)
  202.     (this,ev,id);
  203. }
  204.  
  205.  
  206. /* public method: Clear */
  207. void   Clear(Environment *ev,
  208.         ODChangeID id,
  209.         ODLinkKey key)
  210. {
  211.    SOM_Resolve(this,ODBaseLinkSource,Clear)
  212.     (this,ev,id,key);
  213. }
  214.  
  215.  
  216. /* public method: GetChangeID */
  217. ODChangeID   GetChangeID(Environment *ev)
  218. {
  219.    return SOM_Resolve(this,ODBaseLinkSource,GetChangeID)
  220.     (this,ev);
  221. }
  222.  
  223.  
  224. /* public method: SetAutoUpdate */
  225. void   SetAutoUpdate(Environment *ev,
  226.         ODBoolean automatic)
  227. {
  228.    SOM_Resolve(this,ODBaseLinkSource,SetAutoUpdate)
  229.     (this,ev,automatic);
  230. }
  231.  
  232.  
  233. /* public method: IsAutoUpdate */
  234. ODBoolean   IsAutoUpdate(Environment *ev)
  235. {
  236.    return SOM_Resolve(this,ODBaseLinkSource,IsAutoUpdate)
  237.     (this,ev);
  238. }
  239.  
  240.  
  241. /* public method: GetLink */
  242. ODLink*   GetLink(Environment *ev)
  243. {
  244.    return SOM_Resolve(this,ODBaseLinkSource,GetLink)
  245.     (this,ev);
  246. }
  247.  
  248.  
  249. /* public method: SetSourcePart */
  250. void   SetSourcePart(Environment *ev,
  251.         ODStorageUnit* sourcePartSU)
  252. {
  253.    SOM_Resolve(this,ODBaseLinkSource,SetSourcePart)
  254.     (this,ev,sourcePartSU);
  255. }
  256.  
  257.  
  258. /* public method: ShowSourceContent */
  259. void   ShowSourceContent(Environment *ev)
  260. {
  261.    SOM_Resolve(this,ODBaseLinkSource,ShowSourceContent)
  262.     (this,ev);
  263. }
  264.  
  265.  
  266. /* public method: GetChangeTime */
  267. ODTime   GetChangeTime(Environment *ev)
  268. {
  269.    return SOM_Resolve(this,ODBaseLinkSource,GetChangeTime)
  270.     (this,ev);
  271. }
  272.  
  273.  
  274. /* public method: CloneTo */
  275. ODStorageUnit*   CloneTo(Environment *ev,
  276.         ODDraftKey draftKey,
  277.         ODDraft* destDraft,
  278.         ODStorageUnit* newSourcePartSU)
  279. {
  280.    return SOM_Resolve(this,ODBaseLinkSource,CloneTo)
  281.     (this,ev,draftKey,destDraft,newSourcePartSU);
  282. }
  283.  
  284.  
  285.  
  286. };   /* ODBaseLinkSource */
  287.  
  288.  
  289.  
  290. #endif       /* SOM_ODBaseLinkSource_xh */
  291.